<?php
defined ( 'BASEPATH' ) or exit ( 'No direct script access allowed' );
date_default_timezone_set ( 'prc' );
class User extends CI_Controller {
	public function __construct() {
		parent::__construct ();
		if (! $this->session->userdata ( 'logged_in' )) {
			redirect ( 'index_admin/login' );
			exit ();
		}
	}
	/*
	 * 返回用户列表
	 */
	public function index() {
		$this->load->model ( 'user_model' );
		$data ['users'] = $this->user_model->find_kickback_users ();
		$data ['title'] = '用户管理 - 回扣管理系统';
		$this->load->view ( 'header', $data );
		$this->load->view ( 'user/index' );
		$this->load->view ( 'footer' );
	}
}